//
// Created by XiaoXiu on 2025/4/29.

#ifndef ACCOUNT_H
#define ACCOUNT_H
#include <uthash.h>


/**
 * account struct
 * @param id
 * @param name
 * @param password
 * @param balance
 */


typedef struct account {
    int id;
    char name[32];
    char password[32];
    double balance;
    UT_hash_handle hh;
} account;

extern account *accounts;


account *create_account(int id, const char *name, const char *password, double balance);

void add_account(account *new_account);

account *find_account(int id);

void delete_account(account *account);

#endif //ACCOUNT_H
